#pragma once

#include <ECS/ECS.h>
#include "Item.h"
#include "ItemInstance.h"
#include "../Activator.h"

struct ItemComponentDef : public ActivatorDef
{
	mtMETA_DEC;
	std::string itemId;
};

class ItemComponent : public Activator
{
	mtMETA_DEC;
public:
	bool initWith(ItemComponentDef* def);

	virtual void onActivate(GameObject* actor) override;

	const ItemInstance& getItemInstance() const;
protected:
	ItemInstance _item;
};